<?php
/**
 * Created by PhpStorm.
 * User: 刚
 * Date: 2017/8/1
 * Time: 18:09
 */
include_once('BookTitleDecorator.php');

class BookTitleStarDecorator extends BookTitleDecorator
{
    private $btd;

    public function __construct(BookTitleDecorator $btd_in)
    {
        $this->btd = $btd_in;
    }

    function starTitle()
    {
        $this->btd->title = Str_replace("", "*", $this->btd->title);
    }
}